package sy.model;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;
import java.util.Date;

/**
 * Created by Administrator on 2017/4/11.
 */
@Entity
@Table(name = "trace")
@DynamicInsert(true)
@DynamicUpdate(true)
public class Ttrace implements java.io.Serializable {
	private String id;
	private Date createTime;

	//跟踪时间
	private Date traceTime;

	private String creater;
	//在途信息
	private String remark;
	private Ttransport transport;

	@Id
	@Column(name = "ID", nullable = false, length = 36)
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public Date getTraceTime() {
		return traceTime;
	}

	public void setTraceTime(Date traceTime) {
		this.traceTime = traceTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getCreater() {
		return creater;
	}

	public void setCreater(String creater) {
		this.creater = creater;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "TRANSPORTID")
	public Ttransport getTransport() {
		return transport;
	}

	public void setTransport(Ttransport transport) {
		this.transport = transport;
	}
}
